Repository navigation
Conversation
…mail#33) Only idle-based expiration was selectable. A transport that is claimed often enough never becomes idle long enough for TimeoutSinceLastAllocationExpirationPolicy to retire it, so a pool cannot respect a server that caps how long a connection may live regardless of activity. Exchange Online, for example, resets an SMTP connection after 20 minutes even in the middle of a send. Add mail.smtppool.pool.expiration-since-creation-millis. A transport now expires when either the idle rule or the age rule matches. The default of 0 disables the age rule and preserves the existing behaviour exactly. CombinedExpirationPolicies is deliberately not used to combine the two rules. It holds its members in a Set, while TimeoutExpirationPolicy derives equality from expiryAgeMs alone and its subclasses add no equality of their own, so an idle threshold and an age threshold configured to the same number of milliseconds compare equal and one rule is silently dropped. A small private policy combines the two instead. Reported separately as bbottema/generic-object-pool#24.
…il#33) [skip ci] Add the new property to the provider configuration reference, and show in the Camel adapter README how to set it from a smtppool:// URI, since mail.* endpoint options already reach the Session.
16 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #33.
Add
mail.smtppool.pool.expiration-since-creation-millisto the Jakarta Mail provider and document its use through Camel. The default0disables age-based expiration and preserves the existing single last-claim policy; negative values are rejected when the pool manager is created.Update
clustered-object-poolto 4.1.1, which brings ingeneric-object-pool2.5.1. The provider uses the upstreamCombinedExpirationPoliciesto combine last-claim and creation-age thresholds. Distinct rules with identical thresholds remain present and retain separate expiry state, following Generic Object Pool #24 and #25.Expiration is checked asynchronously while a transport is available. Active leases are not interrupted, and rapid reuse can delay retirement beyond the threshold; this is an eligibility setting rather than a hard connection-lifetime guarantee.
Validation: all 98 tests pass in the full JDK 21
mvn clean verify, including SpotBugs, executable demos, JPMS and binary compatibility checks. All 87 core/provider tests also pass on JDK 8. The deterministic equal-threshold regression fails with the old dependency and passes with the published update. Both object-pool JARs match Maven Central checksums.Released in SMTP Connection Pool 4.2.0. Existing APIs, Java baselines and module names are preserved.